#include "signals.h"
void catcher(int param)
{
    printf("catcher got signal %d\n", param);
    exit(0);
}
int parseArg(const char *buf, int limit)
{
    int res = -1;
    if (sscanf(buf, "%d", &res) == 0)
        return res;
    if (res >= limit)
        return -1;
    if (res < 0)
        return -1;
    return res;
}
